/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vale.test.view;

import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author juan
 */
public abstract class LookAndFeelChooser {

    public static final String WINDOWS_LNF = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    public static final String GTK_LNF = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
    public static final String METAL_LNF = "javax.swing.plaf.metal.MetalLookAndFeel";
    public static final String MOTIF_LNF = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";

    public static void setSystemLookAndFeel(String alternateLnf)
            throws ClassNotFoundException,
            IllegalAccessException,
            InstantiationException,
            UnsupportedLookAndFeelException {
        String lnf = javax.swing.UIManager.getSystemLookAndFeelClassName();
        try {
            javax.swing.UIManager.setLookAndFeel(lnf);
        } catch (Exception ex) {
            javax.swing.UIManager.setLookAndFeel(alternateLnf);
        }
    }
}
